package com.itheima.stock.mapper;

import com.itheima.stock.common.domian.StockBlockDomain;
import com.itheima.stock.pojo.StockBlockRtInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author hyn
 * @description 针对表【stock_block_rt_info(股票板块详情信息表)】的数据库操作Mapper
 * @createDate 2022-05-30 01:02:49
 * @Entity com.itheima.stock.pojo.StockBlockRtInfo
 */
@Repository
public interface StockBlockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockBlockRtInfo record);

    int insertSelective(StockBlockRtInfo record);

    StockBlockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockBlockRtInfo record);

    int updateByPrimaryKey(StockBlockRtInfo record);

    /**
     * 查询国内板块指数数据
     *
     * @param lastDate 交易时间
     * @param number 一共查询几条数据
     * @return  List<StockBlockDomain>
     */
    List<StockBlockDomain> queryAllStockBlock(@Param("date") Date lastDate, @Param("number") Integer number);

    /**
     * 保存保内板块信息
     * @param listInfo
     */
    int insertStockSectorRtIndex(@Param("list") List<StockBlockRtInfo> listInfo);

}
